package com.mentaleye.dal.dao.mybatis;

import com.mentaleye.bean.EmploymentTestimonialsBean;
import com.mentaleye.dal.dao.EmploymentTestimonialsDao;
import com.mentaleye.dal.model.EmploymentTestimonials;
import com.mentaleye.dal.model.EmploymentTestimonialsExample;
import com.mentaleye.dal.service.EmploymentTestimonialsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by hdg on 2017/6/6.
 */
@Repository
public class EmploymentTestimonialsDaoImpl extends BaseDao implements EmploymentTestimonialsDao {

    @Autowired private EmploymentTestimonialsMapper EmploymentTestimonialsMapper;

    public boolean insert(EmploymentTestimonials employmentTestimonials){
        return getResultByInt(EmploymentTestimonialsMapper.insertSelective(employmentTestimonials));
    }

    public boolean update(EmploymentTestimonials employmentTestimonials){
        return getResultByInt(EmploymentTestimonialsMapper.updateByPrimaryKeySelective(employmentTestimonials));
    }



    public boolean updateByExample(EmploymentTestimonials employmentTestimonials,EmploymentTestimonialsExample employmentTestimonialsExample){
        return getResultByInt(EmploymentTestimonialsMapper.updateByExampleSelective(employmentTestimonials,employmentTestimonialsExample));
    }

    public boolean delete(Integer recollectionsId){
        return getResultByInt(EmploymentTestimonialsMapper.deleteByPrimaryKey(recollectionsId));
    }
    public boolean deleteByExample(EmploymentTestimonialsExample employmentTestimonialsExample){
        return getResultByInt(EmploymentTestimonialsMapper.deleteByExample(employmentTestimonialsExample));
    }

    public EmploymentTestimonials select(Integer recollectionsId){
        return this.EmploymentTestimonialsMapper.selectByPrimaryKey(recollectionsId);
    }

    public List<EmploymentTestimonials> selectByExample(EmploymentTestimonialsExample example){
        return this.EmploymentTestimonialsMapper.selectByExample(example);
    }

    @Override
    public List<Map<String, Object>> selectByIdMap(EmploymentTestimonialsBean bean) {
        return this.EmploymentTestimonialsMapper.selectByIdMap(bean);
    }

    @Override
    public List<Map<String, Object>> selectByMap(Map<String, Object> map) {
        return this.EmploymentTestimonialsMapper.selectByMap(map);
    }

    @Override
    public List<Map<String, Object>> selectByStudent() {
        return this.EmploymentTestimonialsMapper.selectByStudent();
    }

    @Override
    public Map<String, Object> selectBystuId(Integer id) {
        return this.EmploymentTestimonialsMapper.selectByStuID(id);
    }
}
